package cn.stylefeng.guns.modular.hp.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 文件下载表实体类
 * </p>
 *
 * @author xzqiang
 * @date 2019-05-26
 */
@TableName("hp_file_download")
public class FileDownloadInfo extends Model<FileDownloadInfo> {

    private static final long serialVersionUID = 1L;

    public static final Integer TEMP_YES = 1;
    public static final Integer TEMP_NO = 0;

    /**
     * 主键ID
     */
    @TableId(value = "id", type = IdType.UUID)
    private String id;

    /**
     * 文件名
     */
    private String filename;

    /**
     * 文件大小
     */
    private Long filesize;

    /**
     * 下载链接
     */
    private String downloadUrl;

    /**
     * 文件位置
     */
    private String dirPath;

    /**
     * 是否为临时文件，0-不是，1-是
     */
    private int temp;

    /**
     * 附件关联文章ID
     */
    private String pageContentInfoId;

    /**
     * 创建者
     */
    private String creater;

    /**
     * 创建时间
     */
    private Date createdTime;

    /**
     * 乐观锁保留字段
     */
    private String version;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getFilename() {
        return filename;
    }

    public void setFilename(String filename) {
        this.filename = filename;
    }

    public Long getFilesize() {
        return filesize;
    }

    public void setFilesize(Long filesize) {
        this.filesize = filesize;
    }

    public String getDownloadUrl() {
        return downloadUrl;
    }

    public void setDownloadUrl(String downloadUrl) {
        this.downloadUrl = downloadUrl;
    }

    public String getDirPath() {
        return dirPath;
    }

    public void setDirPath(String dirPath) {
        this.dirPath = dirPath;
    }

    public int getTemp() {
        return temp;
    }

    public void setTemp(int temp) {
        this.temp = temp;
    }

    public String getPageContentInfoId() {
        return pageContentInfoId;
    }

    public void setPageContentInfoId(String pageContentInfoId) {
        this.pageContentInfoId = pageContentInfoId;
    }

    public String getCreater() {
        return creater;
    }

    public void setCreater(String creater) {
        this.creater = creater;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "FileDownloadInfo{" + "id=" + id + ", filename=" + filename + ", filesize=" + filesize + ",downloadUrl" + downloadUrl + ",dirPath" + dirPath;
    }

}
